<?php if (!defined('THINK_PATH')) exit();?>

<script type="text/javascript">
	
	function check_incharge_form()
	{
		if($("input[name='virtual_number']").val()==''&&$("input[name='robot_num']").val()==''&&$("input[name='virtual_watch_number']").val()=='')
		{
            alert("机器人比例，机器人数，最大机器人头像数至少要填一项");
			return false;
		}
		if($("input[name='virtual_number']").val()!=''&&isNaN($("input[name='virtual_number']").val()))
		{
			alert(LANG['VIRTUAL_NUMBER_FORMAT_ERROR']);
			return false;
		}
		if($("input[name='virtual_watch_number']").val()!=''&&isNaN($("input[name='virtual_watch_number']").val()))
		{
			alert(LANG['MAX_ROBOT_NUM_FORMAT_ERROR']);
			return false;
		}
        if($("input[name='robot_num']").val()!=''&&isNaN($("input[name='robot_num']").val()))
		{
			alert(LANG['VIRTUAL_WATCH_NUMBER_FORMAT_ERROR']);
			return false;
		}
		
		return true;
	}
</script>
<div class="main">
<div class="main_title">房间ID:<?php echo ($video["id"]); ?></div>
<div class="blank5"></div>
<form name="edit" action="__APP__" method="post" enctype="multipart/form-data" onsubmit="return check_incharge_form();">
<table class="form" cellpadding=0 cellspacing=0>
	<tr>
		<td colspan=2 class="topTd"></td>
	</tr>
	<tr>
		<td class="item_title"><?php echo L("VIRTUAL_NUMBER");?>:</td>
		<td class="item_input"><input type="text" class="textbox require" name="virtual_number" value="<?php echo ($video["virtual_number"]); ?>"/>
		</td>
	</tr>
	<tr>
		<td class="item_title"><?php echo L("MAX_ROBOT_NUM");?>:</td>
		<td class="item_input"><input type="text" class="textbox require" name="virtual_watch_number" value="<?php echo ($video["virtual_watch_number"]); ?>"/>
		</td>
	</tr>
    <tr>
        <td class="item_title"><?php echo L("VIRTUAL_WATCH_NUMBER");?>:</td>
        <td class="item_input"><input type="text" class="textbox require" name="robot_num" value="<?php echo ($video["max_robot_num"]); ?>"/>
        </td>
    </tr>
	<!--<tr>
		<td class="item_title"><?php echo L("INCHARGE_MSG");?>:</td>
		<td class="item_input"><input type="text" class="textbox" name="msg" style="width:400px;" />
		</td>
	</tr>-->
	<tr>
		<td class="item_title">&nbsp;</td>
		<td class="item_input">
			<!--隐藏元素-->
			<input type="hidden" name="id" value="<?php echo ($video["id"]); ?>" />
			<input type="hidden" name="<?php echo conf("VAR_MODULE");?>" value="Video" />
			<input type="hidden" name="<?php echo conf("VAR_ACTION");?>" value="modify_video_set" />
			<!--隐藏元素-->
			<input type="submit" class="button" value="<?php echo L("OK");?>" />
			<input type="reset" class="button" value="<?php echo L("RESET");?>" />
		</td>
	</tr>
	<tr>
		<td colspan=2 class="bottomTd"></td>
	</tr>
</table>	 
</form>
</div>